using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_IMPORTDETIAL_MENU.
    /// </summary>
    public class QT_IMPORTDETIAL_MENU
    {
              private string _ID;
      private string _IDCODE;
      private string _PrID;
      private double _Number;
      private decimal _Price;
      private string _UnitName;
      private decimal _DiscountMoney;
      private decimal _TotalMoney;
      private DateTime _DateImport;
      private DateTime _DateReal;
      private string _Note;
      private string _UserName;
      private string _IDPOS;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID; 
      public bool IsIDNullable   
      { 
	 get { return false;  } 
      }
      public string ID
      {
         get { return _ID; }
         set 
	    { 
 		 _ID = value;
		IsSetID = true;
 	    }
      }
    public bool IsSetIDCODE; 
    public bool IsIDCODENullable   
    { 
		get { return false;  } 
    }
    public string IDCODE
    {
        get{ return _IDCODE;  }
        set
		{
			_IDCODE = value;
			IsSetIDCODE = true;
		}
    }
    public bool IsSetPrID; 
    public bool IsPrIDNullable   
    { 
		get { return false;  } 
    }
    public string PrID
    {
        get{ return _PrID;  }
        set
		{
			_PrID = value;
			IsSetPrID = true;
		}
    }
    public bool IsSetNumber; 
    public bool IsNumberNullable   
    { 
		get { return false;  } 
    }
    public double Number
    {
        get{ return _Number;  }
        set
		{
			_Number = value;
			IsSetNumber = true;
		}
    }
    public bool IsSetPrice; 
    public bool IsPriceNullable   
    { 
		get { return false;  } 
    }
    public decimal Price
    {
        get{ return _Price;  }
        set
		{
			_Price = value;
			IsSetPrice = true;
		}
    }
    public bool IsSetUnitName; 
    public bool IsUnitNameNullable   
    { 
		get { return false;  } 
    }
    public string UnitName
    {
        get{ return _UnitName;  }
        set
		{
			_UnitName = value;
			IsSetUnitName = true;
		}
    }
    public bool IsSetDiscountMoney; 
    public bool IsDiscountMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal DiscountMoney
    {
        get{ return _DiscountMoney;  }
        set
		{
			_DiscountMoney = value;
			IsSetDiscountMoney = true;
		}
    }
    public bool IsSetTotalMoney; 
    public bool IsTotalMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoney
    {
        get{ return _TotalMoney;  }
        set
		{
			_TotalMoney = value;
			IsSetTotalMoney = true;
		}
    }
    public bool IsSetDateImport; 
    public bool IsDateImportNullable   
    { 
		get { return false;  } 
    }
    public DateTime DateImport
    {
        get{ return _DateImport;  }
        set
		{
			_DateImport = value;
			IsSetDateImport = true;
		}
    }
    public bool IsSetDateReal; 
    public bool IsDateRealNullable   
    { 
		get { return false;  } 
    }
    public DateTime DateReal
    {
        get{ return _DateReal;  }
        set
		{
			_DateReal = value;
			IsSetDateReal = true;
		}
    }
    public bool IsSetNote; 
    public bool IsNoteNullable   
    { 
		get { return false;  } 
    }
    public string Note
    {
        get{ return _Note;  }
        set
		{
			_Note = value;
			IsSetNote = true;
		}
    }
    public bool IsSetUserName; 
    public bool IsUserNameNullable   
    { 
		get { return false;  } 
    }
    public string UserName
    {
        get{ return _UserName;  }
        set
		{
			_UserName = value;
			IsSetUserName = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }

        #endregion

        #region Constructors
        public QT_IMPORTDETIAL_MENU()
        {
            Reset();
        }
        public QT_IMPORTDETIAL_MENU(QT_IMPORTDETIAL_MENU obj)
        {
            	this._ID = obj.ID;
	this._IDCODE = obj.IDCODE;
	this._PrID = obj.PrID;
	this._Number = obj.Number;
	this._Price = obj.Price;
	this._UnitName = obj.UnitName;
	this._DiscountMoney = obj.DiscountMoney;
	this._TotalMoney = obj.TotalMoney;
	this._DateImport = obj.DateImport;
	this._DateReal = obj.DateReal;
	this._Note = obj.Note;
	this._UserName = obj.UserName;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _ID = EmptyValues.v_string;
         _IDCODE = EmptyValues.v_string;
         _PrID = EmptyValues.v_string;
         _Number = EmptyValues.v_double;
         _Price = EmptyValues.v_decimal;
         _UnitName = EmptyValues.v_string;
         _DiscountMoney = EmptyValues.v_decimal;
         _TotalMoney = EmptyValues.v_decimal;
         _DateImport = EmptyValues.v_DateTime;
         _DateReal = EmptyValues.v_DateTime;
         _Note = EmptyValues.v_string;
         _UserName = EmptyValues.v_string;
         _IDPOS = EmptyValues.v_string;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID"] is DBNull))
		{
			obj.ID = (string)reader["ID"];
		}
                if(!(reader["IDCODE"] is DBNull))
		{
			obj.IDCODE = (string)reader["IDCODE"];
		}
                if(!(reader["PrID"] is DBNull))
		{
			obj.PrID = (string)reader["PrID"];
		}
                if(!(reader["Number"] is DBNull))
		{
			obj.Number = (double)reader["Number"];
		}
                if(!(reader["Price"] is DBNull))
		{
			obj.Price = (decimal)reader["Price"];
		}
                if(!(reader["UnitName"] is DBNull))
		{
			obj.UnitName = (string)reader["UnitName"];
		}
                if(!(reader["DiscountMoney"] is DBNull))
		{
			obj.DiscountMoney = (decimal)reader["DiscountMoney"];
		}
                if(!(reader["TotalMoney"] is DBNull))
		{
			obj.TotalMoney = (decimal)reader["TotalMoney"];
		}
                if(!(reader["DateImport"] is DBNull))
		{
			obj.DateImport = (DateTime)reader["DateImport"];
		}
                if(!(reader["DateReal"] is DBNull))
		{
			obj.DateReal = (DateTime)reader["DateReal"];
		}
                if(!(reader["Note"] is DBNull))
		{
			obj.Note = (string)reader["Note"];
		}
                if(!(reader["UserName"] is DBNull))
		{
			obj.UserName = (string)reader["UserName"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _ID = (reader["ID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ID"];
//            _IDCODE = (reader["IDCODE"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDCODE"];
//            _PrID = (reader["PrID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["PrID"];
//            _Number = (reader["Number"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["Number"];
//            _Price = (reader["Price"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["Price"];
//            _UnitName = (reader["UnitName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["UnitName"];
//            _DiscountMoney = (reader["DiscountMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["DiscountMoney"];
//            _TotalMoney = (reader["TotalMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoney"];
//            _DateImport = (reader["DateImport"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["DateImport"];
//            _DateReal = (reader["DateReal"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["DateReal"];
//            _Note = (reader["Note"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Note"];
//            _UserName = (reader["UserName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["UserName"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string ID, string IDCODE, string PrID, double Number, decimal Price, string UnitName, decimal DiscountMoney, decimal TotalMoney, DateTime DateImport, DateTime DateReal, string Note, string UserName, string IDPOS)
        {
                     this._ID = ID;
         this._IDCODE = IDCODE;
         this._PrID = PrID;
         this._Number = Number;
         this._Price = Price;
         this._UnitName = UnitName;
         this._DiscountMoney = DiscountMoney;
         this._TotalMoney = TotalMoney;
         this._DateImport = DateImport;
         this._DateReal = DateReal;
         this._Note = Note;
         this._UserName = UserName;
         this._IDPOS = IDPOS;
        }
    }
}